import { createStore, applyMiddleware } from 'redux'
import createSagaMiddleware from 'redux-saga'
import reducers from './reducer/index'
import { rootSaga } from './reducer/saga'
const sagaMiddle = createSagaMiddleware()
const store = createStore(
  reducers,
  applyMiddleware(sagaMiddle)
)
sagaMiddle.run(rootSaga)
export default store